package com.itwn.portal.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itwn.portal.model.entity.Book;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author 61073
* @description 针对表【t_book】的数据库操作Service
* @createDate 2024-12-06 15:48:42
*/
public interface BookService extends IService<Book> {

    /**
     * 根据销量降序分页查询
     */
    IPage<Book> findTopSales(Integer pageNum, Integer pageSize);

    /**
     * 根据类别分页查询
     */
    IPage<Book> findByType(Integer pageNum, Integer pageSize,Integer typeId);

    /**
     * 通过书籍id查询书籍
     */
    Book findById(Long id);
}
